package com.itheima.demo8;

public class MyReflectDemo1 {
    public static void main(String[] args) throws ClassNotFoundException {
        //获取class对象的三种方式

        //1.全类名：包名 + 类名
        Class calss1 = Class.forName("com.itheima.demo8.Student");

        //2.类名.class
        Class class2 = Student.class;

        //3.对象.getClass();
        Student s = new Student();
        Class class3 = s.getClass();

        System.out.println(calss1 == class2);
        System.out.println(class3 == class2);

    }
}
